package com.p2p.system.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.p2p.model.entity.Userinfo;
import com.p2p.model.vo.IplogQueryVo;
import com.p2p.system.common.Result;
import com.p2p.system.entity.Iplog;
import com.p2p.system.service.IplogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 罗永东
 * @since 2023-12-12
 */
@CrossOrigin
@Api(tags = "日志管理接口")
@RestController
@RequestMapping("/system/iplog")
public class IplogController {

    @Autowired
    private IplogService iplogService;

    @ApiOperation("日志分页查询")
    @GetMapping("/{page}/{limit}")
    public Result getLoginLogPageInfo(
            @PathVariable Long page,
            @PathVariable Long limit,
            IplogQueryVo iplogQueryVo
    ){
        Page<Iplog> pageParam = new Page<>(page,limit);
        IPage<Iplog> page1 = iplogService.getIpLogPage(pageParam ,iplogQueryVo);
        return Result.ok(page1);
    }


}

